<?php
return array(
   'controllers' => array(
      'invokables' => array(
         'Roles\Controller\Roles'   => 'Roles\Controller\RolesController',
         'Roles\Controller\Perfil'  => 'Roles\Controller\PerfilController',
         'Roles\Controller\Permiso' => 'Roles\Controller\PermisoController',
         'Roles\Controller\PerfilXPermiso' => 'Roles\Controller\PerfilXPermisoController',
         'Roles\Controller\UsuarioXPerfil' => 'Roles\Controller\UsuarioXPerfilController',
         'Roles\Controller\Restricted' => 'Roles\Controller\RestrictedController',
      ),
   ),
   'router' => array(
      'routes' => array(

         'roles' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/roles',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\Roles',
                  'action' => 'index',
               ),
            ),
         ),

         'perfiles' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/perfiles[/][:action][/:id]',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\Perfil',
                  'action' => 'index',
               ),
            ),
         ),

         'permisos' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/permisos[/][:action][/:id]',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\Permiso',
                  'action' => 'index',
               ),
            ),
         ),

         'pf_pm' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/pf_pm[/][:action][/:id]',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\PerfilXPermiso',
                  'action' => 'index',
               ),
            ),
         ),

         'us_pf' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/us_pf[/][:action][/:id]',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\UsuarioXPerfil',
                  'action' => 'index',
               ),
            ),
         ),

         'restringido' => array(
            'type' => 'segment',
            'options' => array(
               'route' => '/restringido',
               'constraints' => array(
                  'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                  'id' => '[0-9]+',
               ),
               'defaults' => array(
                  'controller' => 'Roles\Controller\Restricted',
                  'action' => 'index',
               ),
            ),
         ),

      ),
   ),
   'view_manager' => array(
      'template_path_stack' => array(
         'roles' => __DIR__ . '/../view',
      ),
   ),
);
